import 'package:flutter/material.dart';
import 'index_banner.dart';
import 'index_openCourse.dart';
import 'index_openClass.dart';
import 'index_goodCourse.dart';
class Index extends StatefulWidget{
  @override 
  State<StatefulWidget> createState() => _IndexState();
}

class _IndexState extends State<Index>
  with AutomaticKeepAliveClientMixin<Index> {
  @override
  bool get wantKeepAlive => true;
  ScrollController _controller = new ScrollController();
  @override
  void initState() {
    super.initState();
  }
  @override 
  void dispose() {
    _controller.dispose();
    super.dispose();
  }
  @override
  Widget build(BuildContext context){
    super.build(context);
    return Scaffold(
      backgroundColor: Colors.white,
      body: ListView(
        shrinkWrap: true,
        controller: _controller,
        padding: EdgeInsets.only(top: 10.0),
        children: <Widget>[
          Indexbanner(),
          OpenCourse(),
          IndexOpenClass(),
          GoodCourse(),
        ],
      )
    );
  }
}